package com.seeyon.apps.lzmzj.customFieldCtrl;

import com.seeyon.cap4.form.bean.FormBean;
import com.seeyon.cap4.form.bean.button.CommonBtn;
import com.seeyon.cap4.form.modules.importandexport.BusinessDataBean;
import com.seeyon.cap4.form.util.Enums;
import com.seeyon.ctp.common.log.CtpLogFactory;
import org.apache.commons.logging.Log;

import java.util.Map;

public class CreateQRCodeBtn extends CommonBtn {

    private static final Log logger = CtpLogFactory.getLog(CreateQRCodeBtn.class);

    @Override
    public void init() {
        this.setPluginId("createQRCodeBtn");
        //@todo 图标等ue提供之后再修改icon
        this.setIcon("cap-icon-custom-button");
    }

    @Override
    public String getKey() {
        return "1267193033780821164";
    }

    @Override
    public String getNameSpace() {
        return "customBtn_" + this.getKey();
    }

    @Override
    public String getText() {
        return "生成二维码";
    }

    @Override
    public String getPCInjectionInfo() {
        return "{\"path\":\"apps_res/cap/customCtrlResources/createQRCodeControl/\",\"jsUri\":\"js/createQRCodeControl.js\",\"initMethod\":\"init\",\"nameSpace\":\"" + this.getNameSpace() + "\"}";
    }

    @Override
    public boolean canUse(Enums.FormType formType) {
        return true;

    }

    @Override
    public String getMBInjectionInfo() {
        return null;
    }

    @Override
    public void importInfoAfterBizImport(FormBean formBean, String customParam, BusinessDataBean businessDataBean, Map<String, Object> btnInfoMap) {
    }

}
